// stores/queryResults.js
import { defineStore } from 'pinia'

export const useQueryResultsStore = defineStore('queryResults', {
    state: () => ({
        results: null,
        targetRoute: null,
        queryStatement: '',
        showResults: false
    }),
    actions: {
        setQueryResults(results:any, targetRoute:any, queryStatement:any) {
            this.results = results
            this.targetRoute = targetRoute
            this.queryStatement = queryStatement
            this.showResults = true
        },
        clearQueryResults() {
            this.results = null
            this.targetRoute = null
            this.queryStatement = ''
            this.showResults = false
        }
    }
})